﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Site.Master" CodeBehind="ManageResources.aspx.cs"
    Inherits="WebView_SSResourceManager.Admin.EditResource" %>

<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="MainContent">
    <div>
        <script type="text/javascript" >
            function MessageBox(result) {
                if (confirm('Вы хотите изучать JavaScript?')) {
                    result = true;
                }
                document.getElementId('Label2').value = "asd";
            }
        </script>
        <asp:ListView ID="lstV_ResourcesView" runat="server" OnItemDeleting="LstVResourcesViewItemDeleting"
            OnSelectedIndexChanged="LstVResourcesViewSelectedIndexChanged" 
            OnSelectedIndexChanging="LstVResourcesViewSelectedIndexChanging">
            <EmptyDataTemplate>
                <table id="Table1" runat="server" style="">
                    <tr>
                        <td>
                            Sorry, but users are not available
                        </td>
                    </tr>
                </table>
            </EmptyDataTemplate>
            <ItemTemplate>
                <tr style="">
                    <td>
                        <asp:Label runat="server" Text='<%# Eval("Name") %>' />
                    </td>
                    <td>
                        <a href="EditResource.aspx?<%# Eval("id") %>">Edit </a>
                    </td>
                    <td>
                        <asp:LinkButton ID="lbtnDelete" runat="server" CommandName="Select" >
                            Delete
                        </asp:LinkButton>
                    </td>
                </tr>
            </ItemTemplate>
            <LayoutTemplate>
                <table id="listTable" runat="server">
                    <tr id="Header" runat="server">
                        <td id="Td1" runat="server">
                            <table id="itemPlaceholderContainer" runat="server" border="0" style="">
                                <tr id="Tr2" runat="server" style="">
                                    <th id="Th1" runat="server">
                                        Resource Name
                                    </th>
                                    <th id="Th2" runat="server">
                                        Edit
                                    </th>
                                    <th id="Th3" runat="server">
                                        Delete
                                    </th>
                                </tr>
                                <tr id="itemPlaceholder" runat="server">
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </LayoutTemplate>
            <SelectedItemTemplate>
                <tr style="">
                    <td>
                        <asp:Label ID="Label1" runat="server" Text='<%# Eval("Name") %>' />
                    </td>
                    <td>
                        <a href="EditResource.aspx?<%# Eval("id") %>">Edit </a>
                    </td>
                    <td>
                        <asp:LinkButton Text="Ok" runat="server" CommandName="Delete" >
                        </asp:LinkButton>
                    </td>
                </tr>
            </SelectedItemTemplate>
        </asp:ListView>
        <asp:Label ID="Label2" runat="server" Text="Label"></asp:Label>
    </div>
</asp:Content>
